<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class CreateCommonFsMessageTemplate extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('common_fs_message_template', function (Blueprint $table) {
            $table->id();

            $table->string("templateName")->comment("模版名称")->default("");
            $table->text("templateDesc")->comment("模版描述");
            $table->text("templateContent")->comment("模板内容");
            $table->unsignedTinyInteger("status")->comment("模板状态")->default(1);

            $table->unsignedInteger('createdAt')->default(0)->comment('创建时间');
            $table->unsignedInteger('createdByUid')->default(0)->comment('创建人');
            $table->unsignedInteger('updatedAt')->default(0)->comment('修改时间');
            $table->unsignedInteger('updatedByUid')->default(0)->comment('修改人');

            $table->tinyInteger("isDeleted")->default(0)->comment("是否删除,0:未删除,1:已删除");
            $table->collation = 'utf8mb4_general_ci';
            $table->comment   = '通用飞书模板表';
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('common_fs_message_template');
    }
}
